﻿<%@ Page Language="C#" Theme="Default" MasterPageFile="~/MasterPages/admin.master" AutoEventWireup="true"  CodeFile="SshBatchRelazioniEdit.aspx.cs" Inherits="SshBatchRelazioniEdit" Title="SshBatchRelazioni Edit" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">Ssh Batch Relazioni - Add/Edit</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
		<data:MultiFormView ID="FormView1" DataKeyNames="IdBatch" runat="server" DataSourceID="SshBatchRelazioniDataSource">
		
			<EditItemTemplatePaths>
				<data:TemplatePath Path="~/Admin/UserControls/SshBatchRelazioniFields.ascx" />
			</EditItemTemplatePaths>
		
			<InsertItemTemplatePaths>
				<data:TemplatePath Path="~/Admin/UserControls/SshBatchRelazioniFields.ascx" />
			</InsertItemTemplatePaths>
		
			<EmptyDataTemplate>
				<b>SshBatchRelazioni not found!</b>
			</EmptyDataTemplate>
			
			<FooterTemplate>
				<asp:Button ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert" Text="Insert" />
				<asp:Button ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update" Text="Update" />
				<asp:Button ID="CancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel" />
			</FooterTemplate>

		</data:MultiFormView>
		
		<data:SshBatchRelazioniDataSource ID="SshBatchRelazioniDataSource" runat="server"
			SelectMethod="GetByIdBatch"
		>
			<Parameters>
				<asp:QueryStringParameter Name="IdBatch" QueryStringField="IdBatch" Type="String" />

			</Parameters>
		</data:SshBatchRelazioniDataSource>
		
		<br />

		<data:EntityGridView ID="GridViewSshSocietaStoricoChain1" runat="server"
			AutoGenerateColumns="False"	
			OnSelectedIndexChanged="GridViewSshSocietaStoricoChain1_SelectedIndexChanged"			 			 
			DataSourceID="SshSocietaStoricoChainDataSource1"
			DataKeyNames="IdSocieta"
			AllowMultiColumnSorting="false"
			DefaultSortColumnName="" 
			DefaultSortDirection="Ascending"	
			ExcelExportFileName="Export_SshSocietaStoricoChain.xls"  		
			Visible='<%# (FormView1.DefaultMode == FormViewMode.Insert) ? false : true %>'	
			>
			<Columns>
				<asp:CommandField ShowSelectButton="True" />
				<asp:BoundField DataField="CdSocieta" HeaderText="Cd Societa" SortExpression="[cd_societa]" />				
				<asp:BoundField DataField="Piva" HeaderText="Piva" SortExpression="[PIva]" />				
				<asp:BoundField DataField="RagioneSociale" HeaderText="Ragione Sociale" SortExpression="[Ragione_Sociale]" />				
				<asp:BoundField DataField="OrderKey" HeaderText="Order Key" SortExpression="[Order_Key]" />				
				<data:HyperLinkField HeaderText="Id Batch Relazioni" DataNavigateUrlFormatString="SshBatchRelazioniEdit.aspx?IdBatch={0}" DataNavigateUrlFields="IdBatch" DataContainer="IdBatchRelazioniSource" DataTextField="CdStoricoMensileRete" />
				<data:HyperLinkField HeaderText="Id Tipologia Societa" DataNavigateUrlFormatString="SshTipologiaSocietaEdit.aspx?IdTipologiaSocieta={0}" DataNavigateUrlFields="IdTipologiaSocieta" DataContainer="IdTipologiaSocietaSource" DataTextField="DscTipologiaSocieta" />
				<asp:BoundField DataField="DtIns" HeaderText="Dt Ins" SortExpression="[dt_ins]" />				
				<asp:BoundField DataField="IdRelazione" HeaderText="Id Relazione" SortExpression="[IdRelazione]" />				
			</Columns>
			<EmptyDataTemplate>
				<b>No Ssh Societa Storico Chain Found! </b>
				<asp:HyperLink runat="server" ID="hypSshSocietaStoricoChain" NavigateUrl="~/admin/SshSocietaStoricoChainEdit.aspx">Add New</asp:HyperLink>
			</EmptyDataTemplate>
		</data:EntityGridView>					
		
		<data:SshSocietaStoricoChainDataSource ID="SshSocietaStoricoChainDataSource1" runat="server" SelectMethod="Find"
			EnableDeepLoad="True"
			>
			<DeepLoadProperties Method="IncludeChildren" Recursive="False">
	            <Types>
					<data:SshSocietaStoricoChainProperty Name="SshTipologiaSocieta"/> 
					<data:SshSocietaStoricoChainProperty Name="SshBatchRelazioni"/> 
				</Types>
			</DeepLoadProperties>
			
		    <Parameters>
				<data:SqlParameter Name="Parameters">
					<Filters>
						<data:SshSocietaStoricoChainFilter  Column="IdBatchRelazioni" QueryStringField="IdBatch" /> 
					</Filters>
				</data:SqlParameter>
				<data:CustomParameter Name="OrderByClause" Value="" ConvertEmptyStringToNull="false" /> 
		    </Parameters>
		</data:SshSocietaStoricoChainDataSource>		
		
		<br />
		<data:EntityGridView ID="GridViewSshTraderPrecStorico2" runat="server"
			AutoGenerateColumns="False"	
			OnSelectedIndexChanged="GridViewSshTraderPrecStorico2_SelectedIndexChanged"			 			 
			DataSourceID="SshTraderPrecStoricoDataSource2"
			DataKeyNames="IdTraderPrecStorico"
			AllowMultiColumnSorting="false"
			DefaultSortColumnName="" 
			DefaultSortDirection="Ascending"	
			ExcelExportFileName="Export_SshTraderPrecStorico.xls"  		
			Visible='<%# (FormView1.DefaultMode == FormViewMode.Insert) ? false : true %>'	
			>
			<Columns>
				<asp:CommandField ShowSelectButton="True" />
				<asp:BoundField DataField="MeseInizioFornitura" HeaderText="Mese Inizio Fornitura" SortExpression="[mese_inizio_fornitura]" />				
				<asp:BoundField DataField="Piva" HeaderText="Piva" SortExpression="[piva]" />				
				<asp:BoundField DataField="RagioneSociale" HeaderText="Ragione Sociale" SortExpression="[ragione_sociale]" />				
				<data:HyperLinkField HeaderText="Id Tipologia" DataNavigateUrlFormatString="SshTipologiaSocietaEdit.aspx?IdTipologiaSocieta={0}" DataNavigateUrlFields="IdTipologiaSocieta" DataContainer="IdTipologiaSource" DataTextField="DscTipologiaSocieta" />
				<data:HyperLinkField HeaderText="Id Batch Relazioni" DataNavigateUrlFormatString="SshBatchRelazioniEdit.aspx?IdBatch={0}" DataNavigateUrlFields="IdBatch" DataContainer="IdBatchRelazioniSource" DataTextField="CdStoricoMensileRete" />
				<asp:BoundField DataField="CdTraderPrecedente" HeaderText="Cd Trader Precedente" SortExpression="[cd_Trader_Precedente]" />				
			</Columns>
			<EmptyDataTemplate>
				<b>No Ssh Trader Prec Storico Found! </b>
				<asp:HyperLink runat="server" ID="hypSshTraderPrecStorico" NavigateUrl="~/admin/SshTraderPrecStoricoEdit.aspx">Add New</asp:HyperLink>
			</EmptyDataTemplate>
		</data:EntityGridView>					
		
		<data:SshTraderPrecStoricoDataSource ID="SshTraderPrecStoricoDataSource2" runat="server" SelectMethod="Find"
			EnableDeepLoad="True"
			>
			<DeepLoadProperties Method="IncludeChildren" Recursive="False">
	            <Types>
					<data:SshTraderPrecStoricoProperty Name="SshTipologiaSocieta"/> 
					<data:SshTraderPrecStoricoProperty Name="SshBatchRelazioni"/> 
					<%--<data:SshTraderPrecStoricoProperty Name="SshUtenzeGasStoricoCollection" />--%>
				</Types>
			</DeepLoadProperties>
			
		    <Parameters>
				<data:SqlParameter Name="Parameters">
					<Filters>
						<data:SshTraderPrecStoricoFilter  Column="IdBatchRelazioni" QueryStringField="IdBatch" /> 
					</Filters>
				</data:SqlParameter>
				<data:CustomParameter Name="OrderByClause" Value="" ConvertEmptyStringToNull="false" /> 
		    </Parameters>
		</data:SshTraderPrecStoricoDataSource>		
		
		<br />
		

</asp:Content>

